package com.umpay.config;

/**
 * @author zhanglz:
 * @ClassName AsyncThreadConfig
 * @Description
 * @version 创建时间：2018年6月14日 下午7:52:30
 */

public class AsyncThreadConfig {

	private static AsyncThreadConfig asyncThreadConfig = new AsyncThreadConfig();

	private ThreadLocal<Integer> threadLocal = new ThreadLocal<Integer>();

	public static AsyncThreadConfig getFactory() {
		return asyncThreadConfig;
	}

	public Integer getCurrentCount() {
		Integer integer = threadLocal.get();
		if (integer == null) {
			integer = 0;
		}
		threadLocal.set(integer+1);
		return integer;
	}
}
